package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qj.yantaishan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.ProductToPropertyValueMapper;
import com.qj.yantaishan.domain.ProductToPropertyValue;
import com.qj.yantaishan.service.IProductToPropertyValueService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 商品关联属性值Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class ProductToPropertyValueServiceImpl    extends ServiceImpl<ProductToPropertyValueMapper, ProductToPropertyValue>  implements IProductToPropertyValueService
{
    @Autowired
    private ProductToPropertyValueMapper productToPropertyValueMapper;

    /**
     * 查询商品关联属性值
     * 
     * @param pigcmsId 商品关联属性值主键
     * @return 商品关联属性值
     */
    @Override
    public ProductToPropertyValue selectProductToPropertyValueByPigcmsId(Long pigcmsId)
    {
        return productToPropertyValueMapper.selectProductToPropertyValueByPigcmsId(pigcmsId);
    }

    /**
     * 查询商品关联属性值列表
     * 
     * @param productToPropertyValue 商品关联属性值
     * @return 商品关联属性值
     */
    @Override
    public List<ProductToPropertyValue> selectProductToPropertyValueList(ProductToPropertyValue productToPropertyValue)
    {
        return productToPropertyValueMapper.selectProductToPropertyValueList(productToPropertyValue);
    }

    /**
     * 新增商品关联属性值
     * 
     * @param productToPropertyValue 商品关联属性值
     * @return 结果
     */
    @Override
    public int insertProductToPropertyValue(ProductToPropertyValue productToPropertyValue)
    {
        return productToPropertyValueMapper.insertProductToPropertyValue(productToPropertyValue);
    }

    /**
     * 修改商品关联属性值
     * 
     * @param productToPropertyValue 商品关联属性值
     * @return 结果
     */
    @Override
    public int updateProductToPropertyValue(ProductToPropertyValue productToPropertyValue)
    {

        return productToPropertyValueMapper.updateProductToPropertyValue(productToPropertyValue);
    }

    /**
     * 批量删除商品关联属性值
     * 
     * @param pigcmsIds 需要删除的商品关联属性值主键
     * @return 结果
     */
    @Override
    public int deleteProductToPropertyValueByPigcmsIds(String pigcmsIds)
    {
        return productToPropertyValueMapper.deleteProductToPropertyValueByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除商品关联属性值信息
     * 
     * @param pigcmsId 商品关联属性值主键
     * @return 结果
     */
    @Override
    public int deleteProductToPropertyValueByPigcmsId(Long pigcmsId)
    {
        return productToPropertyValueMapper.deleteProductToPropertyValueByPigcmsId(pigcmsId);
    }
}
